import { Component } from '@angular/core'
import { NavController, NavParams } from 'ionic-angular'
import { DrowingBoardPage } from './drowing-board/drowing-board'
import { GetBgPicService } from '../../../app/get-bg-pic.service'


@Component({
    selector: 'page-series',
    templateUrl: 'series.html',
    providers: [GetBgPicService]
})
export class SeriesPage {
    //选取的背景系列
    private bg_pics=[];
    constructor(public navCtrl: NavController,
                public navParams: NavParams, 
                private getBgPicService:GetBgPicService) {
       var arr =getBgPicService.getPictures(navParams.data.title)[2]
       for (var index = 0; index < arr.length; index++) {
        this.bg_pics.push('url(assets/pictures/'+arr[index]+')');
       }
    }

    openDrowingBoard(index){
        this.navCtrl.push(DrowingBoardPage,{
            title:this.navParams.data.title,
            a:index
        })
    }
}